const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  devServer: {
    port: 8080,
    proxy: {
      '/api': {
        target: 'http://localhost:8082',
        changeOrigin: true
      },
      '/search': {
        target: 'http://localhost:8083',
        changeOrigin: true
      },
      '/activity': {
        target: 'http://localhost:8085',
        changeOrigin: true,
      },
      '/user': {
        target: 'http://localhost:8084',
        changeOrigin: true
      },
      '/gateway': {
        target: 'http://localhost:8081',
        changeOrigin: true
      },
      '/login_register': {
        target: 'http://localhost:8086',
        changeOrigin: true,
        pathRewrite: { '^/login_register': '' }
      },
      '/notification': {
          target: 'http://localhost:8087',
          changeOrigin: true
      }
    }
  }
}) 